﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "" + FOResource.UI.Layout.ConsumerLoan + "";
    var plan = (List<FOModels.HomeLoanTrust.HomeLoanPlanModels>)ViewBag.HomeLoanPlan;
    var shorttemloan = (List<FOModels.ConsumerLoan.ConsumerLoanModels>)ViewBag.ConsumerLoan;
    var i = 1;
    var ProDes = (FOModels.Product.ProductModels)ViewBag.ProDes;
}
<script type="text/javascript">
    var AppUrl = $("#AppUrl").text();
    var lang = $("#CurrentLangCode").html();
    var urlvnbanknet = "http://vnbanknet.com/Content/UpLoad/Images";
    if (lang == "vi-VN") {
        $("#amount-saving").change(function () {
            $.mobile.showPageLoadingMsg();
            var amount = $(this).val().replace(".", "").replace(".", "").replace(".", "");
            var min = 10000000;
            var max = 1000000000;
            if (amount < min) {
                $("#amount-saving").val(number_format(min, 0, ",", "."));
            }
            else if (amount > max) {
                $("#amount-saving").val(number_format(max, 0, ",", "."));
            }
            else {
                $("#amount-saving").val(number_format(amount, 0, ",", "."));
            }
            var val_cate = $("#select-customerloan").val();
            var val_month = $("#years-saving").val();
            var ba = parseFloat(amount);

            $.ajax({
                type: "post",
                url: AppUrl + "/ConsumerLoan/getConsumerLoan",
                data: { planid: val_cate, balance: ba, years: val_month },
                dataType: "json",
                success: function (rvdata) {
                    var htmlcode = "";
                    if (rvdata.length > 0) {
                        if (val_cate == 1) {
                            $(rvdata).each(function (index, item) {
                                htmlcode += "    <tr class='odd views-row-first'>";
                                htmlcode += "   <td class='views-field views-field-name muted'>";
                                htmlcode += "     <strong><a title='" + item.ConsumerLoanName + "' class='name-product-list ui-link' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.ConsumerLoanName).toLowerCase() + "/" + item.ConsumerLoanID + "'>" + item.ConsumerLoanName + "</a>";
                                htmlcode += "        <br>";
                                htmlcode += " <a title='" + item.CompanyName + "' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "' class='ui-link'>";
                                htmlcode += "           <img class='img-logo-bank' src=''></a>";
                                htmlcode += "   </strong></td>";
                                htmlcode += "   <td class='cl-mid highlight-blue interest-rate-data value' colspan='2'>";
                                htmlcode += "     <span class='highlight-blue interest-rate'>Liên hệ</span><br>";
                                htmlcode += "  </td>";
                                htmlcode += "  <td class='cl-mid text-center'><a href='" + AppUrl + "/consumer-loan/apply/" + item.ConsumerLoanID + "' data-role='button' data-icon='arrow-r' data-iconpos='notext' data-theme='c' data-inline='true' data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' title='Tham gia' class='ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-notext'><span class='ui-btn-inner'><span class='ui-btn-text'>Tham gia</span><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></span></a></td>";
                                htmlcode += "  </tr>";
                            });
                        }
                        else {
                            var payment = 0;
                            $(rvdata).each(function (index, item) {
                                var total = 0;
                                for (i = 1; i <= val_month * 12; i++) {
                                    total += Math.pow((1 + (item.InterestVND / 100 / 12)), -i);
                                }
                                htmlcode += "    <tr class='odd views-row-first'>";
                                htmlcode += "   <td class='views-field views-field-name muted'>";
                                htmlcode += "     <strong><a title='" + item.ConsumerLoanName + "' class='name-product-list ui-link' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.ConsumerLoanName).toLowerCase() + "/" + item.ConsumerLoanID + "'>" + item.ConsumerLoanName + "</a>";
                                htmlcode += "        <br>";
                                htmlcode += " <a title='" + item.CompanyName + "' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "' class='ui-link'>";
                                htmlcode += "           <img class='img-logo-bank' src='" + urlvnbanknet + "/" + item.CompanyImg + "'></a>";
                                htmlcode += "   </strong></td>";
                                if (item.InterestVND != 0) {
                                    htmlcode += " <td style='vertical-align:middle;'>";
                                    htmlcode += "<p class='highlight-blue text-p'>" + item.InterestVND.toString().replace(".", ",") + " %</p>";
                                    htmlcode += " </td>";
                                    htmlcode += " <td style='vertical-align:middle;'>";
                                    htmlcode += "<p class='highlight-blue text-p'>" + number_format(ba / total, 0, ",", ".") + "</p>";

                                    htmlcode += " </td>";
                                }
                                else {
                                    htmlcode += "   <td class='cl-mid highlight-blue interest-rate-data value' colspan='2'>";
                                    htmlcode += "     <span class='highlight-blue-1 interest-rate'>Liên hệ</span><br>";
                                    htmlcode += "  </td>";
                                }
                                htmlcode += "  <td class='cl-mid text-center'><a href='" + AppUrl + "/consumer-loan/apply/" + item.ConsumerLoanID + "' data-role='button' data-icon='arrow-r' data-iconpos='notext' data-theme='c' data-inline='true' data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' title='Tham gia' class='ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-notext'><span class='ui-btn-inner'><span class='ui-btn-text'>Tham gia</span><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></span></a></td>";
                                htmlcode += "  </tr>";
                            });
                        }
                    }
                    else {
                        htmlcode = "<tr><td colspan='4' style='text-align:center;'><tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>Không có dữ liệu phù hợp</p></td></tr></td></tr>";
                    }
                    $("#pro-list").html(htmlcode);
                }

            });
            $.mobile.hidePageLoadingMsg();
        });
        $("#years-saving").change(function () {
            $.mobile.showPageLoadingMsg();
            var years = $(this).val();
            var amount = $("#amount-saving").val().replace(".", "").replace(".", "").replace(".", "");
            var min = 1;
            var max = 5;
            if (years < min) {
                $("#years-saving").val(min);
            }
            else if (years > max) {
                $("#years-saving").val(max);
            }
            else {

            }
            var val_cate = $("#select-customerloan").val();
            var val_month = $("#years-saving").val();
            var ba = parseFloat(amount);

            $.ajax({
                type: "post",
                url: AppUrl + "/ConsumerLoan/getConsumerLoan",
                data: { planid: val_cate, balance: ba, years: val_month },
                dataType: "json",
                success: function (rvdata) {
                    var htmlcode = "";
                    if (rvdata.length > 0) {
                        if (val_cate == 1) {
                            $(rvdata).each(function (index, item) {
                                htmlcode += "    <tr class='odd views-row-first'>";
                                htmlcode += "   <td class='views-field views-field-name muted'>";
                                htmlcode += "     <strong><a title='" + item.ConsumerLoanName + "' class='name-product-list ui-link' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.ConsumerLoanName).toLowerCase() + "/" + item.ConsumerLoanID + "'>" + item.ConsumerLoanName + "</a>";
                                htmlcode += "        <br>";
                                htmlcode += " <a title='" + item.CompanyName + "' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "' class='ui-link'>";
                                htmlcode += "           <img class='img-logo-bank' src=''></a>";
                                htmlcode += "   </strong></td>";
                                htmlcode += "   <td class='cl-mid highlight-blue interest-rate-data value' colspan='2'>";
                                htmlcode += "     <span class='highlight-blue interest-rate'>Liên hệ</span><br>";
                                htmlcode += "  </td>";
                                htmlcode += "  <td class='cl-mid text-center'><a href='" + AppUrl + "/consumer-loan/apply/" + item.ConsumerLoanID + "' data-role='button' data-icon='arrow-r' data-iconpos='notext' data-theme='c' data-inline='true' data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' title='Tham gia' class='ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-notext'><span class='ui-btn-inner'><span class='ui-btn-text'>Tham gia</span><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></span></a></td>";
                                htmlcode += "  </tr>";
                            });
                        }
                        else {
                            var payment = 0;
                            $(rvdata).each(function (index, item) {
                                var total = 0;
                                for (i = 1; i <= val_month * 12; i++) {
                                    total += Math.pow((1 + (item.InterestVND / 100 / 12)), -i);
                                }
                                htmlcode += "    <tr class='odd views-row-first'>";
                                htmlcode += "   <td class='views-field views-field-name muted'>";
                                htmlcode += "     <strong><a title='" + item.ConsumerLoanName + "' class='name-product-list ui-link' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.ConsumerLoanName).toLowerCase() + "/" + item.ConsumerLoanID + "'>" + item.ConsumerLoanName + "</a>";
                                htmlcode += "        <br>";
                                htmlcode += " <a title='" + item.CompanyName + "' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "' class='ui-link'>";
                                htmlcode += "           <img class='img-logo-bank' src='" + urlvnbanknet + "/" + item.CompanyImg + "'></a>";
                                htmlcode += "   </strong></td>";
                                if (item.InterestVND != 0) {
                                    htmlcode += " <td style='vertical-align:middle;'>";
                                    htmlcode += "<p class='highlight-blue text-p'>" + item.InterestVND.toString().replace(".", ",") + " %</p>";
                                    htmlcode += " </td>";
                                    htmlcode += " <td style='vertical-align:middle;'>";
                                    htmlcode += "<p class='highlight-blue text-p'>" + number_format(ba / total, 0, ",", ".") + "</p>";

                                    htmlcode += " </td>";
                                }
                                else {
                                    htmlcode += "   <td class='cl-mid highlight-blue interest-rate-data value' colspan='2'>";
                                    htmlcode += "     <span class='highlight-blue-1 interest-rate'>Liên hệ</span><br>";
                                    htmlcode += "  </td>";
                                }
                                htmlcode += "  <td class='cl-mid text-center'><a href='" + AppUrl + "/consumer-loan/apply/" + item.ConsumerLoanID + "' data-role='button' data-icon='arrow-r' data-iconpos='notext' data-theme='c' data-inline='true' data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' title='Tham gia' class='ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-notext'><span class='ui-btn-inner'><span class='ui-btn-text'>Tham gia</span><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></span></a></td>";
                                htmlcode += "  </tr>";
                            });
                        }
                    }
                    else {
                        htmlcode = "<tr><td colspan='4' style='text-align:center;'><tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>Không có dữ liệu phù hợp</p></td></tr></td></tr>";
                    }
                    $("#pro-list").html(htmlcode);
                }

            });
            $.mobile.hidePageLoadingMsg();
        });
    }
    else {
        $("#amount-saving").change(function () {
            $.mobile.showPageLoadingMsg();
            var amount = $(this).val().replace(",", "").replace(",", "").replace(",", "");
            var min = 10000000;
            var max = 1000000000;
            if (amount < min) {
                $("#amount-saving").val(number_format(min, 0, ".", ","));
            }
            else if (amount > max) {
                $("#amount-saving").val(number_format(max, 0, ".", ","));
            }
            else {
                $("#amount-saving").val(number_format(amount, 0, ".", ","));
            }
            var val_cate = $("#select-customerloan").val();
            var val_month = $("#years-saving").val();
            var ba = parseFloat(amount);

            $.ajax({
                type: "post",
                url: AppUrl + "/ConsumerLoan/getConsumerLoan",
                data: { planid: val_cate, balance: ba, years: val_month },
                dataType: "json",
                success: function (rvdata) {
                    var htmlcode = "";
                    if (rvdata.length > 0) {
                        if (val_cate == 1) {
                            $(rvdata).each(function (index, item) {
                                htmlcode += "    <tr class='odd views-row-first'>";
                                htmlcode += "   <td class='views-field views-field-name muted'>";
                                htmlcode += "     <strong><a title='" + item.ConsumerLoanName + "' class='name-product-list ui-link' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.ConsumerLoanName).toLowerCase() + "/" + item.ConsumerLoanID + "'>" + item.ConsumerLoanName + "</a>";
                                htmlcode += "        <br>";
                                htmlcode += " <a title='" + item.CompanyName + "' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "' class='ui-link'>";
                                htmlcode += "           <img class='img-logo-bank' src=''></a>";
                                htmlcode += "   </strong></td>";
                                htmlcode += "   <td class='cl-mid highlight-blue interest-rate-data value' colspan='2'>";
                                htmlcode += "     <span class='highlight-blue interest-rate'>Contact</span><br>";
                                htmlcode += "  </td>";
                                htmlcode += "  <td class='cl-mid text-center'><a href='" + AppUrl + "/consumer-loan/apply/" + item.ConsumerLoanID + "' data-role='button' data-icon='arrow-r' data-iconpos='notext' data-theme='c' data-inline='true' data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' title='Apply' class='ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-notext'><span class='ui-btn-inner'><span class='ui-btn-text'>Apply</span><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></span></a></td>";
                                htmlcode += "  </tr>";
                            });
                        }
                        else {
                            var payment = 0;
                            $(rvdata).each(function (index, item) {
                                var total = 0;
                                for (i = 1; i <= val_month * 12; i++) {
                                    total += Math.pow((1 + (item.InterestVND / 100 / 12)), -i);
                                }
                                htmlcode += "    <tr class='odd views-row-first'>";
                                htmlcode += "   <td class='views-field views-field-name muted'>";
                                htmlcode += "     <strong><a title='" + item.ConsumerLoanName + "' class='name-product-list ui-link' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.ConsumerLoanName).toLowerCase() + "/" + item.ConsumerLoanID + "'>" + item.ConsumerLoanName + "</a>";
                                htmlcode += "        <br>";
                                htmlcode += " <a title='" + item.CompanyName + "' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "' class='ui-link'>";
                                htmlcode += "           <img class='img-logo-bank' src='" + urlvnbanknet + "/" + item.CompanyImg + "'></a>";
                                htmlcode += "   </strong></td>";
                                if (item.InterestVND != 0) {
                                    htmlcode += " <td style='vertical-align:middle;'>";
                                    htmlcode += "<p class='highlight-blue text-p'>" + item.InterestVND.toString().replace(",", ".") + " %</p>";
                                    htmlcode += " </td>";
                                    htmlcode += " <td style='vertical-align:middle;'>";
                                    htmlcode += "<p class='highlight-blue text-p'>" + number_format(ba / total, 0, ".", ",") + "</p>";

                                    htmlcode += " </td>";
                                }
                                else {
                                    htmlcode += "   <td class='cl-mid highlight-blue interest-rate-data value' colspan='2'>";
                                    htmlcode += "     <span class='highlight-blue-1 interest-rate'>Liên hệ</span><br>";
                                    htmlcode += "  </td>";
                                }
                                htmlcode += "  <td class='cl-mid text-center'><a href='" + AppUrl + "/consumer-loan/apply/" + item.ConsumerLoanID + "' data-role='button' data-icon='arrow-r' data-iconpos='notext' data-theme='c' data-inline='true' data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' title='Apply' class='ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-notext'><span class='ui-btn-inner'><span class='ui-btn-text'>Apply</span><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></span></a></td>";
                                htmlcode += "  </tr>";
                            });
                        }
                    }
                    else {
                        htmlcode = "<tr><td colspan='4' style='text-align:center;'><tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>No result</p></td></tr></td></tr>";
                    }
                    $("#pro-list").html(htmlcode);
                }

            });
            $.mobile.hidePageLoadingMsg();
        });
        $("#years-saving").change(function () {
            $.mobile.showPageLoadingMsg();
            var years = $(this).val();
            var amount = $("#amount-saving").val().replace(",", "").replace(",", "").replace(",", "");
            var min = 1;
            var max = 5;
            if (years < min) {
                $("#years-saving").val(min);
            }
            else if (years > max) {
                $("#years-saving").val(max);
            }
            else {

            }
            var val_cate = $("#select-customerloan").val();
            var val_month = $("#years-saving").val();
            var ba = parseFloat(amount);

            $.ajax({
                type: "post",
                url: AppUrl + "/ConsumerLoan/getConsumerLoan",
                data: { planid: val_cate, balance: ba, years: val_month },
                dataType: "json",
                success: function (rvdata) {
                    var htmlcode = "";
                    if (rvdata.length > 0) {
                        if (val_cate == 1) {
                            $(rvdata).each(function (index, item) {
                                htmlcode += "    <tr class='odd views-row-first'>";
                                htmlcode += "   <td class='views-field views-field-name muted'>";
                                htmlcode += "     <strong><a title='" + item.ConsumerLoanName + "' class='name-product-list ui-link' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.ConsumerLoanName).toLowerCase() + "/" + item.ConsumerLoanID + "'>" + item.ConsumerLoanName + "</a>";
                                htmlcode += "        <br>";
                                htmlcode += " <a title='" + item.CompanyName + "' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "' class='ui-link'>";
                                htmlcode += "           <img class='img-logo-bank' src=''></a>";
                                htmlcode += "   </strong></td>";
                                htmlcode += "   <td class='cl-mid highlight-blue interest-rate-data value' colspan='2'>";
                                htmlcode += "     <span class='highlight-blue interest-rate'>Liên hệ</span><br>";
                                htmlcode += "  </td>";
                                htmlcode += "  <td class='cl-mid text-center'><a href='" + AppUrl + "/consumer-loan/apply/" + item.ConsumerLoanID + "' data-role='button' data-icon='arrow-r' data-iconpos='notext' data-theme='c' data-inline='true' data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' title='Tham gia' class='ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-notext'><span class='ui-btn-inner'><span class='ui-btn-text'>Tham gia</span><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></span></a></td>";
                                htmlcode += "  </tr>";
                            });
                        }
                        else {
                            var payment = 0;
                            $(rvdata).each(function (index, item) {
                                var total = 0;
                                for (i = 1; i <= val_month * 12; i++) {
                                    total += Math.pow((1 + (item.InterestVND / 100 / 12)), -i);
                                }
                                htmlcode += "    <tr class='odd views-row-first'>";
                                htmlcode += "   <td class='views-field views-field-name muted'>";
                                htmlcode += "     <strong><a title='" + item.ConsumerLoanName + "' class='name-product-list ui-link' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + convertounsign(item.ConsumerLoanName).toLowerCase() + "/" + item.ConsumerLoanID + "'>" + item.ConsumerLoanName + "</a>";
                                htmlcode += "        <br>";
                                htmlcode += " <a title='" + item.CompanyName + "' href='" + AppUrl + "/consumer-loan/" + convertounsign(item.CompanyName).toLowerCase() + "/" + item.CompanyID + "' class='ui-link'>";
                                htmlcode += "           <img class='img-logo-bank' src='" + urlvnbanknet + "/" + item.CompanyImg + "'></a>";
                                htmlcode += "   </strong></td>";
                                if (item.InterestVND != 0) {
                                    htmlcode += " <td style='vertical-align:middle;'>";
                                    htmlcode += "<p class='highlight-blue text-p'>" + item.InterestVND.toString().replace(",", ".") + " %</p>";
                                    htmlcode += " </td>";
                                    htmlcode += " <td style='vertical-align:middle;'>";
                                    htmlcode += "<p class='highlight-blue text-p'>" + number_format(ba / total, 0, ".", ",") + "</p>";

                                    htmlcode += " </td>";
                                }
                                else {
                                    htmlcode += "   <td class='cl-mid highlight-blue interest-rate-data value' colspan='2'>";
                                    htmlcode += "     <span class='highlight-blue-1 interest-rate'>Liên hệ</span><br>";
                                    htmlcode += "  </td>";
                                }
                                htmlcode += "  <td class='cl-mid text-center'><a href='" + AppUrl + "/consumer-loan/apply/" + item.ConsumerLoanID + "' data-role='button' data-icon='arrow-r' data-iconpos='notext' data-theme='c' data-inline='true' data-corners='true' data-shadow='true' data-iconshadow='true' data-wrapperels='span' title='Apply' class='ui-btn ui-btn-up-c ui-shadow ui-btn-corner-all ui-btn-inline ui-btn-icon-notext'><span class='ui-btn-inner'><span class='ui-btn-text'>Apply</span><span class='ui-icon ui-icon-arrow-r ui-icon-shadow'>&nbsp;</span></span></a></td>";
                                htmlcode += "  </tr>";
                            });
                        }
                    }
                    else {
                        htmlcode = "<tr><td colspan='4' style='text-align:center;'><tr><td colspan='6' style='margin-top: 10px;font-weight: bold;text-align: center;margin-bottom: 10px;'>No result</p></td></tr></td></tr>";
                    }
                    $("#pro-list").html(htmlcode);
                }

            });
            $.mobile.hidePageLoadingMsg();
        });
    }
</script>
<div style="padding: 10px; padding-bottom: 0px;">
    <div id="fixed-deposit-calculator" class="panel panel-large">
        <div id="calculator-form">
            <div class="field">
                <label class="color-text" for="amount">@FOResource.UI.Product.HomeLoan.loanamount</label>
                <div class="clr"></div>
                <div class="controls line-height">
                    <div class="input-prepend">
                        <input data-theme="b" class="amount" type="text" name="amount-saving" value="50.000.000" id="amount-saving">
                        <span data-theme="b" class="add-on">VND</span>
                    </div>
                </div>
            </div>
            <div class="clr"></div>
            <div class="field">
                <label class="color-text" for="months">@FOResource.UI.Product.HomeLoan.loanperiod</label>
                <div class="clr"></div>
                <div class="controls line-height">
                    <div class="input-append">
                        <input type="text" name="years-saving" value="1" id="years-saving" class="years time input-mini">
                        <span class="add-on">@FOResource.UI.Layout.years</span>
                    </div>
                </div>
            </div>
            <div class="clr"></div>
            <div class="fieldcontain" data-role="fieldcontain" data-mini="true">
                <legend class="color-text mar-bot">@FOResource.UI.Product.HomeLoan.payments</legend>
                <select name="select-native-17" id="select-customerloan" data-mini="true" data-corners="false">
                    @if (plan.Count > 0)
                    {
                        foreach (var ca in plan)
                        {
                        <option value="@ca.HomeLoanPlanID">@ca.HomeLoanPlanName</option>
                        }
                    }
                </select>
            </div>
        </div>
    </div>
</div>
<div class="container">
    <table data-role="table" id="table-custom-2" data-mode="" class="product-list ui-body-d ui-shadow table-stripe ui-responsive" data-column-btn-theme="b">
        <thead>
            <tr class="ui-bar-b">
                <th class="text-center">@FOResource.UI.Product.Card.lblbank</th>
                <th style="width: 15%" class="text-center">@FOResource.UI.Product.Deposit.interest %</th>
                <th class="text-center">@FOResource.UI.Layout.amountpaymonth (VND)</th>
                <th class="text-center">@FOResource.UI.Product.Card.lblapply1</th>
            </tr>
        </thead>
        <tbody id="pro-list">
            @if (shorttemloan.Count > 0)
            {
                foreach (var h in shorttemloan)
                {
                    double total = 0;
                    for (i = 1; i <= 12; i++)
                    {
                        total += Math.Pow((1 + (h.InterestVND / 100 / 12)), -i);
                    }
                <tr class="views-row-first">
                    <td class="views-field views-field-name muted">
                        <strong><a title="@h.ConsumerLoanName" class="name-product-list" href="@Url.Action("Detail", "ConsumerLoan", new { CompanyName = FO.Models.Conver.ConvertToUnSign(h.CompanyName).ToLower(), ConsumerLoanName = FO.Models.Conver.ConvertToUnSign(h.ConsumerLoanName).ToLower(), ConsumerLoanID = h.ConsumerLoanID })">@h.ConsumerLoanName</a>
                            <br />
                            <a title="@h.CompanyName" href="@Url.Action("TermSavingByProvider", "ConsumerLoan", new { CompanyName = FO.Models.Conver.ConvertToUnSign(h.CompanyName).ToLower(), CompanyID = h.CompanyID })">
                                <img class="img-logo-bank" src="@Url.Content("http://vnbanknet.com/Content/UpLoad/Images/" + h.CompanyImg + "")" /></a>
                        </strong></td>
                    @if (h.InterestVND != 0)
                    {
                        <td class="cl-mid highlight-blue interest-rate-data value">
                            <span class="highlight-blue interest-rate">@h.InterestVND.ToString().Replace(".", "" + FOResource.UI.Layout.currency1 + "") %</span><br>
                        </td>
                        <td class="cl-mid value">
                            <div class="highlight-blue total-interest">@String.Format("{0:0,0}", 50000000 / total).Replace(",", "" + FOResource.UI.Layout.currency + "")</div>

                        </td>
                    }
                    else
                    {
                        <td class="cl-mid highlight-blue interest-rate-data value" colspan="2">
                            <span class="highlight-blue interest-rate">@FOResource.UI.Layout.contact</span><br>
                        </td>
                    }
                    <td class="cl-mid text-center"><a href="@Url.Action("ConsumerLoanInfo", "ConsumerLoan", new { ConsumerLoanID = h.ConsumerLoanID })" data-role="button" data-icon="arrow-r" data-iconpos="notext" data-theme="c" data-inline="true">@FOResource.UI.Product.Card.lblapply</a></td>
                </tr>
                
                }
            }
        </tbody>
    </table>
    <div data-role="collapsible" data-theme="b" data-mini="true" data-corners="false" data-content-theme="d">
        <h4>@FOResource.UI.Layout.ConsumerLoan</h4>
        <div class="bot-main">
            <div class="bottom_tabbed">
                <div class="bottom_center">
                    @Html.Raw(ProDes.Description)
                </div>
            </div>
        </div>
    </div>
</div>
